package org.linlinjava.litemall.db.service;

import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.dao.PayMemberMapper;
import org.linlinjava.litemall.db.domain.LumierePayMemberUserLogVo;
import org.linlinjava.litemall.db.domain.LumierePayMemberUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDate;
import java.util.List;

@Service
public class PayMemberService {
    @Resource
    private PayMemberMapper payMemberMapper;

    public List<LumierePayMemberUserVo> queryPayMemberUsers(String userName, String memberName,Integer page,Integer limit,String sort,String order ){
       return payMemberMapper.queryPayMemberUsers(userName,memberName,page,limit,sort,order);
    }

    public List<LumierePayMemberUserLogVo> queryPayMemberUserLogs(String userName, String memberName,
                                                                  Byte purchaseType, LocalDate buyTime, Byte payType,String sort,String order){
        return payMemberMapper.queryPayMemberUserLogs(userName,memberName,purchaseType,buyTime,payType,sort,order);
    }

    public List<LumierePayMemberUserLogVo> queryPayMemberUserLogsByUid(String userId, String sort, String order) {
        return payMemberMapper.queryPayMemberUserLogsByUid(userId,sort,order);
    }
}
